package top.du1888.ai.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import top.du1888.ai.domain.TCar;

import java.util.List;

@Mapper
@Repository
public interface CarMapper {

    //根据id查询单个用户数据
    TCar getCarById(Integer id);
    /**
     * 查询所有汽车
     * @return
     */
    List<TCar> getAll();

    @Select("select * from t_car where id=#{id}")
    TCar getUserByParam(@Param("id") Integer id);
}
